<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<% request.setAttribute("ctx",request.getContextPath()); %>
<%@ include file="/header.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>用户注册</title>
</head>
<body>
<div style="text-align:center;">
 <h1>用户登录</h1>
	<form action="${ctx}/user/manager?func=login" method="post" onsubmit="return validate(this)">
		<p>
			用户名：<input name="username" type="text" id="name">
		</p>
		<p>
			密 &nbsp;码：<input name="password" type="password" id="password">
		</p>
		<p>
			<input type="submit" value="登录" />
			<input type="reset" value="重置" />
		</p>
	</form>
	${message}
	</div>
</body>

	<script type="text/javascript">
	function validate(myform){
		if(myform.username.value.length == 0){
			alert("用户名不能为空！");
			myform.username.focus();
			return false;
		}
		if(myform.password.value.length < 4){
			alert("密码长度不能小于4");
			myform.password.focus();
			return false;
		}
		return true;
	}
	
	</script>

</html>
